import Vue from 'vue'
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)

import mapping from '../../base/mapping'
const locale = mapping.J_lanCode()

import zh from './zh'
import en from './en'
export const messages = { en, zh }

export default new Promise(resolve => {
	//国际化数据可能需要异步获取
	resolve(new VueI18n({
		locale,
		messages,
		silentTranslationWarn: true
	}))
})
